<!doctype html> 
<html ng-app='text'> 
<head> 
    <meta charset="utf-8"> 
    <title></title>  
    <script type="text/javascript" src='angular.js'></script>
    <script type="text/javascript">
 
    var app = angular.module('text',[]);


    app.provider('leo',function (){
        this.$get = function (){
            return {
                x:20,
                l:function (n){
                    alert(n);
                }
            }
        }
    })


    app.controller('const1',function ($scope,leo){
        leo.l(leo.x)
        //leo.p(10)
      //  console.log(leo);
       // console.log(leo.l.k);

    });

    </script>
</head>
<body ng-controller='const1'>



</body>
</html>